



#ifndef _VIN_H264_DECODER_H_
#define _VIN_H264_DECODER_H_

#include "VinDefines.h"
 

// Callback function called by the decoder after decoding of one frame.
typedef void (*DecodeCompleteCallback)(DecodedFrameList*    decProcData,
                                       void*                inContext);



class VinH264Decoder
{
    public:

        // Default Constructor.
        VinH264Decoder ();

        // Destructor.
        ~VinH264Decoder ();

        // Initilize the decoder.
        UInt32 InitVinH264Decoder (UInt32 inBufferSize);

        // Function to decode the bitstream in the buffer.
        UInt32 Decode (UInt8* bitstream);

        // Method to subscribe to frame decode complete event.
        void SubscribeDecodeCompleteEvent (DecodeCompleteCallback decodeProc);
};


// Factory function to create the decoder instance.
static VinH264Decoder* CreateDecoder ();

// Function to release the decoder.
void ReleaseDecoder (VinH264Decoder* decoder);



#endif